<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
<#assign base=request.contextPath  />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title></title>
    <link rel="stylesheet" href="${base}/frame/layui/css/layui.css">
    <link rel="stylesheet" href="${base}/frame/static/css/style.css">
    <link rel="icon" href="${base}/frame/static/image/code.png">
    <script type="text/javascript" src="${base}/frame/layui/layui.all.js"></script>
    <script type="text/javascript" src="${base}/js/zhang.js"></script>
    <script type="text/javascript" src="${base}/js/jquery.min.js"></script>
    <style type="text/css">
        form {
            padding: 10px;
        }

        .layui-btn-radius {
            border-radius: 5px;
        }
        .layui-form-item .layui-inline {
            display: block;
            margin-right: 0;
            margin-bottom:0px;
            clear: both;
        }
    </style>
</head>
<body>
<form class="layui-form" action="">
    <input type="hidden" id="ptId" value="${ptId}">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label"><a style="color:red">*</a>&nbsp;企业名称</label>
            <div class="layui-input-inline">
                <input name="number" id="ptName" lay-verify="required" autocomplete="off" class="layui-input isNull"
                       type="text">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label"><a style="color:red">*</a>法律人信息</label>
            <div class="layui-input-inline">
                <input name="number" id="flinfo" lay-verify="required" autocomplete="off" class="layui-input isNull"
                       type="text">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label"><a style="color:red">*</a>&nbsp;联系电话</label>
            <div class="layui-input-inline">
                <input name="number" id="phone" lay-verify="required" autocomplete="off" class="layui-input isNull"
                       type="text">
            </div>
        </div>

        <div class="layui-inline">
            <label class="layui-form-label"><a style="color:red">*</a>&nbsp;账户密码</label>
            <div class="layui-input-inline">
                <input name="number" id="pass" lay-verify="required" autocomplete="off" class="layui-input isNull"
                       type="text">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label"><a style="color:red">*</a>联系人姓名</label>
            <div class="layui-input-inline">
                <input name="number" id="callName" lay-verify="required" autocomplete="off" class="layui-input isNull"
                       type="text">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label"><a style="color:red">*</a>&nbsp;真实姓名</label>
            <div class="layui-input-inline">
                <input name="number" id="trueName" lay-verify="required" autocomplete="off" class="layui-input isNull"
                       type="text">
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn layui-btn-radius" lay-submit lay-filter="formDemo" type="button"
                        onclick="Checksbmint()" style="background-color: #0092EF;">立即提交
                </button>
                <button type="reset" class="layui-btn layui-btn-primary layui-btn-radius">重置</button>
            </div>
        </div>

    </div>
</form>

<script>
    layui.use(['form', 'layer','table'], function () {

        var form = layui.form
                , layer = layui.layer;

    })
    function Checksbmint() {
        var jsonDate = {};
        jsonDate.callName = $("#callName").val();
        jsonDate.trueName = $("#trueName").val();
        jsonDate.callPhone = $("#phone").val();
        jsonDate.relactionUserInfo = $("#flinfo").val();
        jsonDate.pantId = $("#ptId").val();
        jsonDate.passWord = $("#pass").val();
        jsonDate.ptname = $("#ptName").val();

        if (!isNull()) {
            return;
        }
        if (!isNum()) {
            return;
        }
        $.ajax({
            type: "POST",
            url: "${base}/comPeople/addPt",
            data: {"param": JSON.stringify(jsonDate) },
            success: function (data) {
                window.parent.layer.msg(data);
                setTimeout(function(){
                    window.parent.location.reload();
                },2000)

            }
        });
    }


</script>
</body>
</html>
